import { useCountState } from "./../../store/index"

const btnStyle = {
    margin: '1rem'
}

export default function () {
    // 状态管理
    const [count, setCount] = useCountState()

    return (
        <div>
            Home Page
            <strong style={btnStyle} >{count}</strong>
            <button style={btnStyle} onClick={() => setCount(count + 1)}>增加</button>
            <button style={btnStyle} onClick={() => setCount(count - 1)}>减少</button>
        </div>
    );
}
